package cn.flashapp.queue.main;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

import cn.flashapp.queue.reponsitory.NotificationQueue;

import com.koolearn.util.SystemGlobals;

public class PushMain {
	public static void main(String[] args) {
		String msg = "你好";
		try {
			SystemGlobals.loadConfig("SystemGlobals.properties");
			String cl = SystemGlobals.getPreference("queueReponsitory");
			if (cl == null)
				return;
			StringTokenizer st = new StringTokenizer(cl, ";");
			List<String> list = new ArrayList<String>();
			while (st.hasMoreTokens()) {
				list.add(st.nextToken());
			}
			
			NotificationQueue.getInstance().setCname( list.get(0) );
			NotificationQueue.getInstance().pushTopMsgToQueue( msg );
			
//			msg = "-.-";
//			NotificationQueue.getInstance().pushOtherMsgToQueue(msg);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
